package com.example.fileupload.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author cc
 * @since 2022-08-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="FileChunk对象", description="")
public class FileChunk implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private String uid;
    @ApiModelProperty(value = "当前分片序号,从0开始")
    private int chunk;
    @ApiModelProperty(value = "当前分片大小")
    private long size;
    @ApiModelProperty(value = "分片总数")
    private int chunks;
    @ApiModelProperty(value = "当前文件名称")
    private String name;
    @ApiModelProperty(value = "当前文件的md5,不是分片的")
    private String md5;
    @ApiModelProperty(value = "当前文件的分片对象")
    private MultipartFile file;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

}
